﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Language" content="en" />
        <meta name="keywords" content="sparql grammar parser antlr" />
        <link rel="shortcut icon" href="favicon.ico" />
        <link rel="license" href="" />
        <link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
        <title>RDFCoder - Command line</title>
    </head>

    <body>
        <div id="container">
            
			<div id="header">
                <h1>RDFCoder - Command line</h1>
            </div>

            <div id="page">
                <!-- START SIDEBAR -->
                <div id="sidebar">
                    <div id="sidebarslidebox">
                        <div>

                            <div class="related">
                                <div>
									<h3>Navigation<h3/>
									<ul>
										<li><a href="index.html">Home</a></li>
									</ul>
                                    <h3>Main</h3>
                                    <ul>
                                        <li><a href="#obtain_help">Obtain help</a></li>
										<li><a href="#commands">Commands</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- END SIDEBAR -->

                <div id="content">
                    <div class="article">
						<a name="obtain_help"></a>
                        <h1 class="firstHeading">Obtain help</h1>
                        <p>
							To obtain help on available commands use the <b>help</b> command.
						</p>
<font color="green">
<pre>
default> help
</pre>
</font>
								

                    </div>
				<div/>

	            <div id="content">
                   <div class="article">
					<a name="commands"></a>
                       <h1 class="firstHeading">Commands</h1>
                       <p>
						The RDF Coder command line provides a way to handle <b>code models</b>.
						<br/>
						A <b>code model</b> (for semplicity <i>model</i>) is a representation of a
						class path that can be composed by source code (.java), compiled code(.class), documentation
						(.java documentation) and other supported formats.
						A <i>model</i> can be queried by SPARQL queries, or browsed via inspection.
						<br/>
						<font color="red">TODO: provide short graph on <i>model</i> life cycle</font>
						<br/>
						A <i>model</i> life cycle starts with a from scratch creation or by loading the <i>model</i> from a storage.
						It is possible to populate a <i>model</i> by loading classpath objects. The loading of classpath objects can be
						done is different sessions. A <i>model</i> can be cleaned to remove the entire content.
						A populated <i>model</i> can be queried by using SPARQL, on inspected with inspector functions.
						Finally a <i>model</i> can be made persistent on any supported <b>code storage</b> like database or filesystem.
						<br/>
						Many supported commands are specifically applied on a <i>model</i>, at any time
						the console has a <i>selected model</i> that is printed in prompt.
						If a <i>model</i> related command is invoked with no explicit model name, the command
						is invoked on the selected one.
						<br/>
						<br/>

						The main commands are:
						<table border="1">
							<tr>
								<td><b>debug</b></td>
								<td>
									Enables / disables the debug mode.
									<br/>
									<i><b>debug [true | false]?</b></i>
									<br/>
									With argument this command enables / disables the debug mode. 
									If called without arguments shows the current value of the debug <i>flag</i>.
								</td>
							</tr>
							<tr>
								<td><b>pwd</b></td>
								<td>
									Prints the current directory.
									<br/>
									<i><b>pwd</b></i>
									<br/>
									This command prints the current working directory, such directory
									is used every time a <i>relative</i> path is specified as argument in other
									commands requiring file system resources.
								</td>
							</tr>
							<tr>
								<td><b>cd</b></td>
								<td>
									Changes the current directory.
									<br/>
									<i><b>cd &lt;path_to_dir&gt;</b></i>
									<br/>
									This command changes the current working directory.
									The &lt;path_to_dir&gt; argument can be both an absolute
									path or a relative path. 
								</td>
							</tr>
							<tr>
								<td><b>ls</b></td>
								<td>
									Lists the content of the current directory.
									<br/>
									<i><b>ls</b></i>
									<br/>
									This command lists the content of the current working directory,
									reporting for every file the type (file or directory), the size
									and the writing permissions.
								</td>
							</tr>
							<tr>
								<td><b>list</b></td>
								<td>
									Lists all the currently loaded models.
									<br/>
									<i><b>list</b></i>
									<br/>
									prints out the list of all the loaded models, the name of the selected model is marked with an asterisk.
								</td>
							</tr>
							<tr>
								<td><b>setmodel</b></td>
								<td>
									Allows to set the <i><b>selected model</b></i>.
									<br/>
									<i><b>setmodel [&lt;model_name&gt;]</b></i>
									<br/>
									<i>model name</i> is the name of the model to set as selected, if not specified the command
									prints out the name of the currently <i>selected model</i>.
									<br/>
									Any command requiring a model name uses the <i>selected model</i> if
									no explicit model was specified. The <i>selected model</i> name is printed out 
									in prompt.
								</td>
							</tr>
							<tr>
								<td><b>newmodel</b></td>
								<td>
									Creates a new <i>Code Model</i> to store library informations.
									<br/>
									<i><b>newmodel &lt;model_name&gt;</b></i>
									<br/>
									<i>model name</i> is the name of the new model, that must differ from the names
									of the already loaded models.
									<br/>
									This command creates a code model from scrath. A CodeModel 
									is a triples container able to handle data generated by 
									code parsers. This model can be queried and inspected, stored and relaoded
									from any supported storage.
								</td>
							</tr>
							<tr>
								<td><b>clearmodel</b></td>
								<td>
									Cleans the content of a CodeModel.
									<br/>
									<i><b>clearmodel [&lt;model_name&gt;]</b></i>
									<br/>
									<i>model name</i> is the name of the model model to delete, if not specified the 
									<i>selected model</i> is deleted.
									<br/>
									This command removes all the triples present in the specified model.
								</td>
							</tr>
							<tr>
								<td><b>removemodel</b></td>
								<td>
									Removes a previously created <i>Code Model</i>.
									<br/>
									<i><b>removemodel [&lt;model_name&gt;]</b></i>
									<br/>
									<i>model name</i> is the name of the model to remove, if not specified the 
									<i>selected model</i>is removed.
									<br/>
									Removing a model deletes all the not stored content.
									To make the content of the model persistent use <b>savemodel</b>.
								</td>
							</tr>
							<tr>
								<td><b>querymodel</b></td>
								<td>
									Allows to perform a query (SPARQL) on the current model.
									<br/>
									<i><b>querymodel &lt;query&gt;</b></i>
									<br/>
									Performs the SPARQL <i>query</i> on the <i>selected model</i>. 
								</td>
							</tr>
							<tr>
								<td><b>inspectmodel</b></td>
								<td>
									Allows to inspect the <i>current model</i>. 
									<br/>
									<i><b>inspectmodel &lt;query&gt;</b></i>
									<br/>
									Performs an inpection <i>query</i> on the <i>selected model</i>. 
									<font color="red">TODO: provide references to the query syntax.</font>
								</td>
							</tr>
							<tr>
								<td><b>loadmodel</b></td>
								<td>
									Loads a library model.
									<br/>
									<i><b>loadmodel &lt;storage_name&gt; &lt;storage_param_1&gt; ...</b></i>
									<br/>
									This command loads a model with name <i>storage_name</i> retrieving it
									from a phisical storage which access is described using a list of
									<i>storage_parameters</i>.
								</td>
							</tr>
							<tr>
								<td><b>savemodel</b></td>
								<td>
									Saves a model on a storage.
									<br/>
									<i><b>savemodel &lt;storage_type&gt; &lt;storage_parameters&gt;</b></i>
									<br/>
									Saves the model on the storage specified with <i>storage type</i>
									using the given <i>parameters</i>. Storage type can be fs or db.
									The parameters are storage dependend. For filesystem there is
									fsfile containing the path to the file to store the model.
									For db there are dbuser, dbpassword, dbname. <font color="red">TODO: TBC</font>
									<br/>
								</td>
							</tr>
							<tr>
								<td><b>loadclasspath</b></td>
								<td>
									Loads source classpath extracting the RDF representation.
									<br/>
									<i><b>loadclasspath [classpath]</b></i>
									<br/>
									Loads the <i>classpath</i> on the selected model.
									The classpath is a <b>:</b> separated list of paths
									locating source packages, class packages or jar files.
									If paths are expressed as relative ones, the reference dir is
									given by the <i>pwd</i> command.
								</td>
							</tr>
						</table>
					</p>
                   </div>
				 <div/>
                <!-- end id content -->

                <div id="footer">
                    <ul>
                        <li>Copyright &copy; 2007 - The <a href="http://code.google.com/p/rdf-coder/">RDF Coder</a> team</li>
                    </ul>
                    <ul>
                        <li>Content is available under <a href="http://path/to/apache/license">Apache License</a> [the Apache License].</li>
                    </ul>
                </div>

            </div>
            <!-- end id page -->

        </div>
        <!-- end id container -->
    </body>

</html>
